<!DOCTYPE html>
<html lang="zh">

<head>
    <title></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <link href="../css/style.css" rel="stylesheet"> </head>

<body>
    <div id="myApp">
        <h3>游戏列表</h3>
        <!-- Virtual DOM -->
        <div v-if="seen">2017最新发卖</div>
        <ol>
            <li v-for="game in games">{{game.title}} / {{game.price}}元</li>
        </ol>
    </div>

    <div id="myFiction">
        <h3>小说列表</h3>
        <ol>
            <li v-for="item in finctions">
                小说名：{{item.name}}<br/>
                作者：{{item.authName}}<br/>
                章节：{{item.num}}<br/>
            </li>
        </ol>
    </div>
</body>



    <script>
        var myApp = new Vue({
            el: '#myApp', 
            data: {
                seen: false, 
                games: [
                    {
                        title: '勇者斗恶龙', 
                        price: 400
                    },
                     {
                        title: '超级马里奥' , 
                        price: 380
                    } , 
                    {
                        title: '我的世界',
                         price: 99
                    }
            ]}
         });


    var vue2 = new Vue({
        el:"#myFiction",
        data:{
            finctions:[
                {name:"豆粕苍穹",authName:"天蚕土豆",num:"1800"},
                {name:"逆天邪神",authName:"火星引力",num:"586"},
                {name:"西游记",authName:"吴冠中",num:"300"},
            ]
        }
    })

    </script>


</html>